Skip to content

fix(js-sdk): update JS SDK code samples to current @sap-ai-sdk API#24161

Open
InjunPark-sap wants to merge 1 commit into
sap-tutorials:masterfrom
InjunPark-sap:fix/orchestration-js-sdk-samples
Open

fix(js-sdk): update JS SDK code samples to current @sap-ai-sdk API#24161
InjunPark-sap wants to merge 1 commit into
sap-tutorials:masterfrom
InjunPark-sap:fix/orchestration-js-sdk-samples

Conversation

@InjunPark-sap

Copy link
Copy Markdown
Member

Summary

Update JavaScript SDK code samples across the SAP AI Core Orchestration
tutorials to match the current @sap-ai-sdk/orchestration API.

Affected tutorials

  • Consumption of GenAI models Using Orchestration — A Beginner's Guide
  • Leveraging Orchestration Capabilities to Enhance Responses
  • Orchestration with Grounding Capabilities in SAP AI Core

Changes

Category Details
OrchestrationClient constructor llm.model_name + templatingpromptTemplating.model.name + promptTemplating.prompt; deploymentConfig moved to second arg
chatCompletion inputParamsplaceholderValues
Helper function signatures buildLlamaGuardFilterbuildLlamaGuard38BFilter; buildAzureContentSafetyFilter, buildTranslationConfig, buildDpiMaskingProvider, buildDocumentGroundingConfig updated to current API
Imports CDN/Deno imports → npm; 'fs/promises''node:fs/promises'; remove non-exported types (TemplatingModuleConfig)
Syntax / type annotations Remove duplicate from; remove TS type annotations from JS tab

Verification

All changes verified against
@sap-ai-sdk/orchestration source
and sample-code.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants